/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tpgen.patterns;

/**
 *
 * @author shanki
 */
public class TransformationPattern {
    
    private OntologyPattern op1;
    private OntologyPattern op2;
    private PatternTransformation pt;
    
    public TransformationPattern(OntologyPattern op1, OntologyPattern op2, PatternTransformation pt) {
        this.op1    = op1;
        this.op2    = op2;
        this.pt     = pt;
    }
    
    public OntologyPattern getSourceOp() {
        return op1;
    }
    
    public OntologyPattern getTargetOp() {
        return op2;
    }
    
    public PatternTransformation getPt() {
        return pt;
    }

    @Override
    public String toString() {       
        StringBuilder sb = new StringBuilder();
        
        sb.append("<tp xmlns=\"http://nb.vse.cz/~svabo/patomat/tp/tp-schema.xsd\" name=\"tp_downgrading\">\n");
        
        sb.append("  <op1>\n");
        sb.append(op1.toString());
        sb.append("  </op1>\n");
        
        sb.append(" <op2>\n");
        sb.append(op2.toString());
        sb.append(" </op2>\n");
        
        sb.append("  <pt>\n");
        sb.append(pt.toString());        
        sb.append("  </pt>\n");
        
        sb.append("</tp>\n");
        
        return sb.toString();
    }
    
    
    
}
